<html>

<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
    <title>
        js调用java
    </title>
    <style type="text/css">
    .musicbtn {
        width: 80px;
        height: 40px;
        font-size: 16px;
        line-height: 40px;
        color: #fff;
        background-color: rgba(25, 225, 225, .5);
        text-align: center;
        border-radius: 20px;
        position: absolute;
        top: 40%;
        right: 20px;
    }
    
    .btn {
        height: 40px;
        line-height: 40px;
        font-size: 16px;
        background-color: #ffd541;
        color: #fff;
        width: 180px;
        text-align: center;
        border-radius: 5px;
        margin-top: 10px;
    }
    </style>
</head>

<body>
    <div id="show">
    </div>
    <div id="show2">
    </div>
    <div id="show3">
    </div>
    <div class="btn" data-type="0">登录</div>
    <div class="btn" data-type="1">注册</div>
    <div class="btn" data-type="2">首页</div>
    <div class="btn" data-type="3">投资列表 </div>
    <div class="btn" data-type="4">项目详情</div>
    <div class="btn" data-type="5">跳转到申请资产标借款</div>
    <div class="btn" data-type="6">我的投资</div>
    <div class="btn" data-type="7">投资详情</div>
    <div class="btn" data-type="8">团宝箱</div>
    <div class="btn" data-type="9">现金红包</div>
    <div class="btn" data-type="10">投资红包 </div>
    <div class="btn" data-type="11">加息卷</div>
    <div class="btn" data-type="12">提现卷</div>
    <div class="btn" data-type="13">抵扣卷</div>
    <div class="btn" data-type="14">签到卡</div>
    <div class="btn" data-type="15">精美礼品</div>
    <div class="btn" data-type="16">充值 </div>
    <div class="btn" data-type="17">安全中心</div>
    <div class="btn" data-type="18">手机验证</div>
    <div class="btn" data-type="19">身份证验证</div>
    <div class="btn" data-type="20">我的财富</div>
    <div class="btn" data-type="21">邀请好友</div>
    <div class="btn" data-type="22">活动分享</div>
    <div class="btn" data-type="23">WE计划</div>
    <div class="btn" data-type="24"> WE计划 * 项目详情</div>
    <div class="btn" data-type="25"> 我的投资详情（WE计划）</div>
    <div class="btn" data-type="26">发现</div>
    <div class="btn" data-type="27">新手专区</div>
    <div class="btn" data-type="28">团贷公告列表</div>
    <div class="btn" data-type="29">团贷公告详情 </div>
    <div class="btn" data-type="30">系统消息详情</div>
    <div class="btn" data-type="31">我要借款</div>
    <div class="btn" data-type="32">意见反馈</div>
    <div class="btn" data-type="33">团贷社区</div>
    <div class="btn" data-type="34">自动投标</div>
    <div class="btn" data-type="35">我的借款列表</div>
    <div class="btn" data-type="36">我的借款详情 </div>
    <div class="btn" data-type="37">系统消息列表</div>
</body>
<script src="../zepto-animate.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jsbridge_0617_2.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/util.js" type="text/javascript" charset="utf-8"></script>
<!-- <script src="./js/index.js" type="text/javascript" charset="utf-8"></script> -->
<script>
(function() {
    //登录验证
    var isAppOpen = true;
    var isLogined = Util.checkLogin();
    if (!isLogined) {
        Util.openLogin(isAppOpen);
    }

    Util.toast("isLogined---" + isLogined);
    $(".btn").on('click', function() {

        var type = $(this).attr('data-type');
        switch (parseInt(type)) {
            case 0:
                //跳转到登录
                //判断是否为新版本的app， 是的话用新方式跳转，否则按照原来的方式跳转
                Jsbridge.toAppLogin();
                break;
            case 1:
                //跳转到注册
                Jsbridge.toAppRegister();
                break;
            case 2:
                //跳转到首页
                Jsbridge.toAppMainPage();
                break;
            case 3:
                //投资列表
                Jsbridge.toAppInvestList();

                break;
            case 4:
                // 项目详情 
                /**
                    toAppInvestDetails(Id, TypeId, SubTypeId, ProfitTypeId, XmbSubType)
                    Id 41a72bbea40a42beaae443f292e6d5de
                    TypeId 10
                    SubTypeId 0
                    ProfitTypeId 0
                */
                Jsbridge.toAppInvestDetails('41a72bbea40a42beaae443f292e6d5de', 10, 0, 0);
                break;
            case 5:
                // 跳转到申请资产标借款（我要借款子页面）
                Jsbridge.toAppLoan();
                break;
            case 6:
                // 我的投资
                Jsbridge.toAppMyInvest();
                break;
            case 7:
                //投资详情
                /**
                    toAppMyInvestDetail(ProjectId,Type,InvestId,ProfitTypeId,IsWePlanX,SubTypeId)
                    数据1
                    InvestId c58ac9471e2348a8876b7d050ab48109
                    ProjectId b83d65b899244b2187a2772bcf77f083
                    Type 11
                    ProfitTypeId 0
                    IsWePlanX false
                    数据2
                    InvestId a0cfc10ecbd44bf1a5afa6f2de43e7d7
                    ProjectId
                    Type 100
                    ProfitTypeId 0
                    IsWePlanX false
                    数据3
                    InvestId 20387f5ae21749f5b83537fdcdc93c04
                    ProjectId
                    Type 100
                    ProfitTypeId 0
                    IsWePlanX true
                */
                Jsbridge.toAppMyInvestDetail('b83d65b899244b2187a2772bcf77f083', 11, 'c58ac9471e2348a8876b7d050ab48109', 0, false, '');
                break;
            case 8:
                // 团宝箱
                Jsbridge.toAppTBX();
                break;
            case 9:
                // 现金红包
                Jsbridge.toAppCashRedPacket();
                break;
            case 10:
                // 投资红包
                Jsbridge.toAppOrdinaryRedPacket();
                break;
            case 11:
                // 加息卷
                Jsbridge.toAppKasiRedPacket();
                break;
            case 12:
                // 提现卷
                Jsbridge.toAppWithdrawalRoll();
                break;
            case 13:
                // 抵扣卷
                Jsbridge.toAppRebateRedPacket();
                break;
            case 14:
                // 签到卡
                Jsbridge.toAppSingInRoll();
                break;
            case 15:
                // 精美礼品
                Jsbridge.toAppPresent();
                break;
            case 16:
                // 充值
                Jsbridge.toAppRecharge();
                break;
            case 17:
                // 安全中心
                Jsbridge.toAppSecurityCenter();
                break;
            case 18:
                // 手机验证
                Jsbridge.toAppMobileVerify();
                break;
            case 19:
                // 身份证验证
                Jsbridge.toAppIdentityVerify();
                break;
            case 20:
                // 我的财富
                Jsbridge.toAppPersonalCenter();
                break;
            case 21:
                // 邀请好友
                Jsbridge.toAppInviteFriend();
                break;
            case 22:
                // 活动分享
                Jsbridge.toActivityAppInviteFriend();
                break;
            case 23:
                // WE计划
                Jsbridge.toAppWePlan();
                break;
            case 24:
                // WE计划 * 项目详情
                /**
                    toAppWePlanDetail(productId) 
                */
                Jsbridge.toAppWePlanDetail('1cec2540001247c3831fd83216ddbc55');
                break;
            case 25:
                // 我的投资详情（WE计划）
                Jsbridge.toAppMyInvestDetail('', 100, '20387f5ae21749f5b83537fdcdc93c04', 0, true);
                break;
            case 26:
                //发现
                Jsbridge.toAppFind();
                break;
            case 27:
                //新手专区
                Jsbridge.toAppBeginnersArea();
                break;
            case 28:
                //团贷公告列表
                Jsbridge.toAppPublicNoticeList();
                break;
            case 29:
                //团贷公告详情
                Jsbridge.toAppPublicNoticeDetails('102');
                break;
            case 30:
                //系统消息详情
                Jsbridge.toAppSystemMessagesDetails('F2B3338A-4F1D-4AE7-B667-45AED6303CCB');
                break;
            case 31:
                //我要借款
                Jsbridge.toAppIWantBorrow();
                break;
            case 32:
                //意见反馈
                Jsbridge.toAppFeedBack();
                break;
            case 33:
                //团贷社区
                Jsbridge.toAppTuandaiBBS();
                break;
            case 34:
                //自动投标
                Jsbridge.toAppAutoBid();
                break;
            case 35:
                //我的借款列表
                Jsbridge.toAppMyBorrowing();
                break;
            case 36:
                //我的借款详情
                Jsbridge.toAppMyBorrowingDetails('C0FD6D02-75DE-433D-83B2-E5230CA399FB', 25, '26F53653-0D78-4405-92C0-004BE3C09D6C', 0, true, 0);
                break;
            case 37:
                //系统消息列表
                Jsbridge.toAppSystemMessagesList();
                break;


        }
    });



})();
</script>

</html>
